#!bin/sh
CKPT_PATH=$1
NAME=$2
THS=$3
OUT_DIR=/workspace/volume/detection/median_out/$NAME
mkdir -p $OUT_DIR
IN_DIR=/workspace/volume/cm-mmlab/test_suite/

for dir in $IN_DIR/codec/*
do
    echo $dir
    for video in $dir/*.mp4
    do
        echo $video
        python tools/video_visualize.py \
            --ckpt_path ${CKPT_PATH} \
            --input_name $video \
            --output_name ${OUT_DIR}/codec/$(basename $dir)/$(basename $video) \
            --threshold ${THS}
    done
done

